サインとコサインのカーブ
10 OPTION ANGLE DEGREES
SET WINDOW 0 , 360 , 0 , 360
FOR d=0 TO 360
SET POINT STYLE 1
PLOT POINTS : d,180
LET y1=SIN(d)*100
LET y12=SIN(d+1)*100
PLOT LINES: d, 180+y1;d+1,180+y12
LET y2=cos(d)*100
LET y22=COS(d+1)*100
PLOT lineS: d, 180+y2;d+1,180+y22
next d
END
ランダム関数を使う
100 EXTERNAL PICTURE number
外部絵定義によって同じ図形を描く
100 EXTERNAL PICTURE number
月齢
増殖
5 REM life game by HAJIME HIRAO 2006
FOR d=30 TO 120 STEP 10
clear
8 option base 0
set window 0,200,0,200
10 LET px=0
LET py=0
LET t=0
20 print "LlFE"
40 DIM a(100,100),b$(100)
45 FOR y = 2 TO 99
FOR x = 2 TO 99
LET a(x,y) = 0
next x
next y
50 LET h = 1
print "絵の大きさは?(1以上)"
LET sc=2
60 print "Enter a pattern(type end when finished):"
70 LET b$(h)="random"
75 IF b$(h) = "random" THEN GOTO 900
80 if b$(h) = "end" then
LET h = h-1
goto 120
END IF
90 IF LEN(b$(h)) > w THEN LET w = LEN(b$(h))
100 LET h = h+1
110 GOTO 70
120 LET xmin = int(50-w/2)
LET ymin = int(50-h/2)
LET xmax = xmin+w
LET ymax = ymin+h
130 FOR y = 1 TO h
FOR x = 1 TO w
140 IF b$(y)(x:x+1-1) = "." THEN GOTO 160
150 LET a(x+xmin,y+ymin) = 1
160 next x
NEXT y
170 LET right = 1
LET left = 100
LET top = 100
LET bottom = 1
180 FOR y = ymin TO ymax
FOR x = xmin TO xmax
190 IF a(x,y) = 11 THEN
LET a(x,y) = 1
if a(x,y) = 10 then LET a(x,y) = 0
END IF
200 IF a(x,y) = 1 THEN
gosub 600
goto 220
END IF
210 gosub 620
goto 260
220 IF x > right THEN LET right = x
230 IF x < left THEN LET left = x
240 IF y < top THEN LET top = y
250 IF y > bottom THEN LET bottom = y
260 next x
GOSUB 700
NEXT y
270 REM for y = ymax+1 to 40
REM print
REM next y
280 PRINT "LIFE";d;"GENERATION:";t
282 IF t=400 THEN GOTO 1000
285 REM WAIT DELAY .001
LET py=0+t/4
290 LET xmin = left
LET ymin = top
LET xmax = right
LET ymax = bottom
300 if xmin < 3 then LET xmin = 3
310 IF ymin < 3 THEN LET ymin = 3
320 if xmax > 98 then LET xmax = 98
330 if ymax > 98 then LET ymax = 98
340 LET t = t+1
LET xmin = xmin-1
LET ymin = ymin-1
LET xmax = xmax+1
LET ymax = ymax+1
350 for y = ymin to ymax
for x = xmin to xmax
360 LET nbrs = a(x-1,y-1)+a(x,y-1)+a(x+1,y-1)+a(x-1,y)
370 LET nbrs = INT(nbrs/10)
380 LET nbrs = nbrs+a(x+1,y)+a(x-1,y+1)+a(x,y+1)+a(x+1,y+1)
390 LET nbrs = nbrs-10*INT(nbrs/10)
400 LET a(x,y) = a(x,y)-10*INT(a(x,y)/10)
410 LET a(x,y) = 10*a(x,y)
420 IF nbrs = 3 THEN GOTO 450
430 IF nbrs <> 2 THEN GOTO 460
440 if a(x,y) <> 10 then goto 460
450 LET a(x,y) = a(x,y)+1
460 next x
NEXT y
470 GOTO 180
600 if sc=1 then goto 605
SET POINT STYLE 3
GOTO 610
605 set point style 1
610 SET POINT COLOR t
plot points : px,py
LET px = px+sc
return
620 if sc=1 then goto 625
set point style 3
GOTO 630
625 set point style 1
630 REM set point color 0
REM plot points : px,py
LET px = px+sc
return
700 LET py = py+sc
LET px = 0
return
900 rem ramdomize
910 REM print "Enter density:"
920 REM LET d=38
930 for y = 2 to 99
for x = 2 to 99
935 IF y < 8 THEN
LET a(x,y) = 0
ELSE
GOTO 950
END IF
940 IF RND*(d+100) < d THEN LET a(x,y) = 1
950 next x
next y
960 LET xmin = 3
LET ymin = 3
LET xmax = 98
LET ymax = 98
970 GOTO 180
1000 NEXT d
1100 GOTO 5
END
渦巻き
10 SET WINDOW -2,2,2,-2
20 SET POINT STYLE 1
30 OPTION ANGLE DEGREES
40 FOR t=0 TO 360 STEP 6
LET x=SIN (t)
LET y=SIN(t)/3+COS (t)/3
SET COLOR 1
DRAW disk WITH SCALE(0.01)*SHIFT(x,y)
LET x=SIN (t+2)/2
LET y=SIN(t-2)/4+COS (t-2)/4
SET COLOR 1
DRAW disk WITH SCALE(0.01)*SHIFT(x,y+0.2)
LET x=SIN (t+4)/3
LET y=SIN(t-4)/5+COS (t-4)/5
SET COLOR 1
DRAW disk WITH SCALE(0.01)*SHIFT(x,y+0.4)
LET x=SIN (t)/4
LET y=SIN(t)/3+COS (t)/3
SET COLOR 1
DRAW disk WITH SCALE(0.01)*SHIFT(x,y+0.6)
LET x=SIN (t)/5
LET y=SIN(t)/3+COS (t)/3
SET COLOR 1
DRAW disk WITH SCALE(0.01)*SHIFT(x,y+0.8)
LET x=SIN (t)/6
LET y=SIN(t)/3+COS (t)/3
SET COLOR 1
DRAW disk WITH SCALE(0.01)*SHIFT(x,y+1)
100 WAIT DELAY 0.1
110 CLEAR
120 NEXT t
130 GOTO 10
500 END
細菌増殖
5 SET WINDOW 0,300,0,300
LET p1=INT((20)*RND)+150
LET q1=INT((20)*RND)+150
LET p2=INT((40)*RND)+150
LET q2=INT((40)*RND)+150
LET p3=INT((60)*RND)+150
LET q3=INT((60)*RND)+150
LET p4=-INT((80)*RND)+150
LET q4=-INT((80)*RND)+150
LET p5=-INT((100)*RND)+150
LET q5=-INT((100)*RND)+150
LET p6=-INT((120)*RND)+150
LET q6=-INT((120)*RND)+150
10 FOR e=0 TO 80
LET ex=e
DRAW circle WITH SCALE(150)*SHIFT(150,150)
50 LET x1=e+INT(10*RND)
SET AREA COLOR x1
DRAW disk WITH SCALE(x1)*SHIFT(p1,q1)
60 LET x2=e+INT(10*RND)
SET AREA COLOR x2
DRAW disk WITH SCALE(x2)*SHIFT(p2,q2)
70 LET x3=e+INT(10*RND)
SET AREA COLOR x3
DRAW disk WITH SCALE(x3)*SHIFT(p3,q3)
80 LET x4=e+INT(10*RND)
SET AREA COLOR x4
DRAW disk WITH SCALE(x4)*SHIFT(p4,q4)
90 LET x5=e+INT(10*RND)
SET AREA COLOR x5
DRAW disk WITH SCALE(x5)*SHIFT(p5,q5)
100 LET x6=e+INT(10*RND)
SET AREA COLOR x6
DRAW disk WITH SCALE(x6)*SHIFT(p6,q6)
110 FOR k=1 TO 1500000
NEXT k
clear
200 NEXT e
210 GOTO 10
END
メタモルフォーゼ
5 SET WINDOW 0,300,300,0
LET t = 50
LET count = 100
LET num = 0
DIM POSX(count)
DIM POSY(count)
DIM SCALE(count)
DIM COLOR(count)
10 FOR i=1 TO count
LET POSX(i) = INT(300*RND)
LET POSY(i) = INT(300*RND)
LET SCALE(i) = INT(5*RND+1)
NEXT i
20 FOR i=1 TO 1000000
NEXT i
SET AREA COLOR 0
PLOT AREA : 0,0;300,0;300,300;0,300;0,0
30 FOR ti=1 TO count
40 IF POSX(ti) = 150 THEN
ELSE
IF POSX(ti) < 150 THEN
LET POSX(ti) = POSX(ti) + (150 - POSX(ti)) / t*INT(30*RND)
ELSE
LET POSX(ti) = POSX(ti) - (POSX(ti) - 150) / t*INT(100*RND)
END IF
END IF
50 IF POSY(ti) = 150 THEN
ELSE
IF POSY(ti) < 150 THEN
LET POSY(ti) = POSY(ti) + (150 - POSY(ti)) / t*INT(50*RND)
ELSE
LET POSY(ti) = POSY(ti) - (POSY(ti) - 150) / t*INT(80*RND)
END IF
END IF
60 SET AREA COLOR 1
DRAW disk WITH SCALE(SCALE(ti))*SHIFT(POSX(ti),POSY(ti))
70 IF POSX(ti) > 149.5 AND POSX(ti) < 150.5 THEN
IF POSY(ti) > 149.5 AND POSY(ti) < 150.5 THEN
LET num = num + 1
END IF
END IF
80 NEXT ti
GOTO 10
END
赤い三角形
10 SET WINDOW 0,400,400,0
20 SET AREA COLOR 4
30 PLOT AREA: 200,100;100,300;300,300
END
リモコンロボット i j k l m のキーで操作
10 SET WINDOW 0,400,400,0
30 SET AREA COLOR 4
PLOT AREA: 165 , 65 ; 235 , 65 ; 235 , 75; 165, 75;165 , 65
SET AREA COLOR 6
PLOT AREA: 165 , 228 ; 235 , 228 ; 235, 240; 165, 240;165 , 228
DRAW disk WITH SCALE(10)*SHIFT(148,235)
DRAW disk WITH SCALE(10)*SHIFT(252,235)
!kao
SET AREA COLOR 6
PLOT AREA: 165 , 125 ; 235 , 125 ; 235 , 130; 165, 130;165 , 125
SET AREA COLOR 2
PLOT AREA: 140 , 155 ; 260 , 155 ; 260, 200; 140, 200;140 , 155
SET AREA COLOR 6
PLOT AREA: 145 , 75 ; 255 , 75 ; 255 ,140; 145, 140;145 , 75
SET AREA COLOR 4
PLOT AREA: 140 , 90 ; 145 , 90 ; 145 , 130; 140, 130;140 , 90
PLOT AREA: 255 , 90 ; 260 , 90 ; 260 , 130; 255, 130;255 , 90
SET AREA COLOR 4
PLOT AREA: 155 , 140 ; 245 , 140 ; 245, 145; 155, 145;155 , 140
SET AREA COLOR 4
PLOT AREA: 130 , 145 ; 270 , 145 ; 270, 255; 130, 255;130 , 145
SET AREA COLOR 4
PLOT AREA: 80 , 150 ; 125 , 150 ; 125, 180; 90, 180;80 , 150
SET AREA COLOR 6
PLOT AREA: 95 , 180 ; 120 , 180 ; 120, 200; 95, 200;95 , 180
SET AREA COLOR 4
PLOT AREA: 90 , 200 ; 125 , 200 ; 125, 220; 90, 220;90 , 200
SET AREA COLOR 6
PLOT AREA: 95 , 220 ; 120 , 220 ; 120, 240; 95, 240;95 , 220
SET AREA COLOR 4
PLOT AREA: 90 , 240 ; 125 , 240 ; 125, 275; 90, 275;90 , 240
PLOT AREA: 85 , 245 ; 90 , 245 ; 90, 255; 85, 255;85 , 245
PLOT AREA: 125 , 155 ; 130 , 155 ; 130, 175; 125, 175;125 , 155
SET AREA COLOR 4
PLOT AREA: 275, 150 ; 320, 150 ; 310, 180; 275, 180;275, 150
SET AREA COLOR 6
PLOT AREA: 280, 180 ; 305, 180 ; 305, 200; 280, 200;280, 180
SET AREA COLOR 4
PLOT AREA: 275, 200 ; 310, 200 ; 310, 220; 275, 220;275, 200
SET AREA COLOR 6
PLOT AREA: 280, 220 ; 305, 220 ; 305, 240; 280, 240;280, 220
SET AREA COLOR 4
PLOT AREA: 275, 240 ; 310, 240 ; 310, 275; 275, 275;275, 240
PLOT AREA: 310, 245 ; 315, 245 ; 315, 255; 310, 255;310, 245
PLOT AREA: 270, 155 ; 275, 155 ; 275, 175; 270, 175;270, 155
SET AREA COLOR 6
PLOT AREA: 140 , 255 ; 190 , 255 ; 190, 290; 145, 290;140 , 255
SET AREA COLOR 4
PLOT AREA: 140 , 290 ; 195 , 290 ; 195, 310; 140, 310;140 , 290
SET AREA COLOR 6
PLOT AREA: 145 , 310 ; 190 , 310 ; 190, 340; 140, 340;145 , 310
SET AREA COLOR 4
PLOT AREA: 130 , 340 ; 195 , 340 ; 195, 370; 130, 370;130 , 340
SET AREA COLOR 6
PLOT AREA: 210 , 255; 260 , 255 ; 255, 290; 210, 290;210 , 255
SET AREA COLOR 4
PLOT AREA: 205 , 290 ; 260 , 290 ; 260, 310; 205, 310;205 , 290
SET AREA COLOR 6
PLOT AREA: 210 , 310 ; 255 , 310 ; 260, 340; 210, 340;210 , 310
SET AREA COLOR 4
PLOT AREA: 205 , 340 ; 270 , 340 ; 270, 370; 205, 370;205 , 340
400 SET COLOR 0
DRAW disk WITH SCALE(14)*SHIFT(170,100)
SET COLOR 0
DRAW disk WITH SCALE(14)*SHIFT(230,100)
SET COLOR 1
DRAW circle WITH SCALE(15)*SHIFT(170,100)
SET COLOR 1
DRAW circle WITH SCALE(15)*SHIFT(230,100)
CHARACTER INPUT nowait :a$
SET COLOR 1
IF a$="i" THEN DRAW disk WITH SCALE(10)*SHIFT( 170,95)
IF a$="j" THEN DRAW disk WITH SCALE(10)*SHIFT(165,100)
IF a$="l" THEN DRAW disk WITH SCALE(10)*SHIFT(175,100)
IF a$="m" THEN DRAW disk WITH SCALE(10)*SHIFT(170,105)
IF a$="k" THEN DRAW disk WITH SCALE(10)*SHIFT(170,100)
IF a$="i" THEN DRAW disk WITH SCALE(10)*SHIFT(230,95)
IF a$="j" THEN DRAW disk WITH SCALE(10)*SHIFT(225,100)
IF a$="l" THEN DRAW disk WITH SCALE(10)*SHIFT(235,100)
IF a$="m" THEN DRAW disk WITH SCALE(10)*SHIFT(230,105)
IF a$="k" THEN DRAW disk WITH SCALE(10)*SHIFT(230,100)
FOR ti=0 TO 5000000
NEXT ti
GOTO 400
END
テ○リス
SET WINDOW 0 , 300 , 300 , 0
CLEAR
OPTION BASE 1
20 DIM a(6),b(6)
FOR n=1 TO 6
LET a(n)=-300
NEXT n
FOR n=1 TO 6
LET b(n)=-300
NEXT n
LET j=1
LET h=280
FOR m=1 TO 6
LET a(m)=0
60 CLEAR
CHARACTER INPUT NOWAIT: a$
IF a$ = "j" THEN LET a(m) = a(m)-1
IF a$ = "k" THEN LET a(m) = a(m)
IF a$ = "l" THEN LET a(m) = a(m)+1
LET b(m)=b(m)+j
SET AREA COLOR 27
DRAW GRID(10,10)
PLOT AREA: 0+a(1),300+b(1);0+a(1),240+b(1);20+a(1),240+b(1);2+a(1),280+b(1);40+a(1),280+b(1);40+a(1),300+b(1)
SET AREA COLOR 31
PLOT AREA: 60+a(2),300+b(2);60+a(2),280+b(2);90+a(2),280+b(2);120+a(2),280+b(2);140+a(2),280+b(2);140+a(2),300+b(2)
SET AREA COLOR 104
PLOT AREA: 180+a(3),300+b(3);180+a(3),280+b(3);200+a(3),280+b(3);200+a(3),260+b(3);220+a(3),260+b(3);220+a(3),280+b(3);260+a(3),280+b(3);260+a(3),300+b(3)
SET AREA COLOR 247
PLOT AREA: 260+a(4),300+b(4);260+a(4),260+b(4);280+a(4),260+b(4);280+a(4),240+b(4);300+a(4),240+b(4);300+a(4),300+b(4)
SET AREA COLOR 72
PLOT AREA: 140+a(5),300+b(5);180+a(5),300+b(5);180+a(5),280+b(5);160+a(5),280+b(5);160+a(5),260+b(5);140+a(5),260+b(5)
SET AREA COLOR 243
PLOT AREA: 0+a(1),300+b(1);2+a(1),298+b(1);2+a(1),282+b(1);0+a(1),280+b(1)
PLOT AREA: 0+a(1),280+b(1);2+a(1),278+b(1);2+a(1),262+b(1);0+a(1),260+b(1)
PLOT AREA: 0+a(1),260+b(1);2+a(1),258+b(1);2+a(1),242+b(1);0+a(1),240+b(1)
PLOT AREA: 20+a(1),300+b(1);22+a(1),298+b(1);22+a(1),282+b(1);20+a(1),280+b(1)
SET AREA COLOR 154
PLOT AREA: 0+a(1),300+b(1);20+a(1),300+b(1);18+a(1),298+b(1);2+a(1),298+b(1)
PLOT AREA: 0+a(1),280+b(1);20+a(1),280+b(1);18+a(1),278+b(1);2+a(1),278+b(1)
PLOT AREA: 0+a(1),260+b(1);20+a(1),260+b(1);18+a(1),258+b(1);2+a(1),258+b(1)
PLOT AREA: 20+a(1),300+b(1);40+a(1),300+b(1);38+a(1),298+b(1);22+a(1),298+b(1)
SET AREA COLOR 99
PLOT AREA: 20+a(1),300+b(1);20+a(1),280+b(1);18+a(1),282+b(1);18+a(1),298+b(1)
PLOT AREA: 20+a(1),280+b(1);20+a(1),260+b(1);18+a(1),262+b(1);18+a(1),278+b(1)
PLOT AREA: 20+a(1),260+b(1);20+a(1),240+b(1);18+a(1),242+b(1);18+a(1),258+b(1)
PLOT AREA: 40+a(1),300+b(1);40+a(1),280+b(1);38+a(1),282+b(1);38+a(1),298+b(1)
SET AREA COLOR 38
PLOT AREA: 0+a(1),280+b(1);2+a(1),282+b(1);18+a(1),282+b(1);20+a(1),280+b(1)
PLOT AREA: 0+a(1),260+b(1);2+a(1),262+b(1);18+a(1),262+b(1);20+a(1),260+b(1)
PLOT AREA: 0+a(1),240+b(1);2+a(1),242+b(1);18+a(1),242+b(1);20+a(1),240+b(1)
PLOT AREA: 20+a(1),280+b(1);22+a(1),282+b(1);38+a(1),282+b(1);40+a(1),280+b(1)
SET AREA COLOR 70
PLOT AREA: 60+a(2),300+b(2);62+a(2),298+b(2);62+a(2),282+b(2);60+a(2),280+b(2)
PLOT AREA: 80+a(2),300+b(2);82+a(2),298+b(2);82+a(2),282+b(2);80+a(2),280+b(2)
PLOT AREA: 100+a(2),300+b(2);102+a(2),298+b(2);102+a(2),282+b(2);100+a(2),280+b(2)
PLOT AREA: 120+a(2),300+b(2);122+a(2),298+b(2);122+a(2),282+b(2);120+a(2),280+b(2)
SET AREA COLOR 189
PLOT AREA: 60+a(2),300+b(2);80+a(2),300+b(2);78+a(2),298+b(2);62+a(2),298+b(2)
PLOT AREA: 80+a(2),300+b(2);100+a(2),300+b(2);98+a(2),298+b(2);82+a(2),298+b(2)
PLOT AREA: 100+a(2),300+b(2);120+a(2),300+b(2);118+a(2),298+b(2);102+a(2),298+b(2)
PLOT AREA: 120+a(2),300+b(2);140+a(2),300+b(2);138+a(2),298+b(2);122+a(2),298+b(2)
SET AREA COLOR 196
PLOT AREA: 80+a(2),300+b(2);80+a(2),280+b(2);78+a(2),282+b(2);78+a(2),298+b(2)
PLOT AREA: 100+a(2),300+b(2);100+a(2),280+b(2);98+a(2),282+b(2);98+a(2),298+b(2)
PLOT AREA: 120+a(2),300+b(2);120+a(2),280+b(2);118+a(2),282+b(2);118+a(2),298+b(2)
PLOT AREA: 140+a(2),300+b(2);140+a(2),280+b(2);138+a(2),282+b(2);138+a(2),298+b(2)
SET AREA COLOR 199
PLOT AREA: 60+a(2),280+b(2);62+a(2),282+b(2);78+a(2),282+b(2);80+a(2),280+b(2)
PLOT AREA: 80+a(2),280+b(2);82+a(2),282+b(2);98+a(2),282+b(2);100+a(2),280+b(2)
PLOT AREA: 100+a(2),280+b(2);102+a(2),282+b(2);118+a(2),282+b(2);120+a(2),280+b(2)
PLOT AREA: 120+a(2),280+b(2);122+a(2),282+b(2);138+a(2),282+b(2);140+a(2),280+b(2)
SET AREA COLOR 187
PLOT AREA: 180+a(3),300+b(3);182+a(3),298+b(3);182+a(3),282+b(3);180+a(3),280+b(3)
PLOT AREA: 200+a(3),300+b(3);202+a(3),298+b(3);202+a(3),282+b(3);200+a(3),280+b(3)
PLOT AREA: 220+a(3),300+b(3);222+a(3),298+b(3);222+a(3),282+b(3);220+a(3),280+b(3)
PLOT AREA: 240+a(3),300+b(3);242+a(3),298+b(3);242+a(3),282+b(3);240+a(3),280+b(3)
PLOT AREA: 200+a(3),280+b(3);202+a(3),278+b(3);202+a(3),262+b(3);200+a(3),260+b(3)
SET AREA COLOR 28
PLOT AREA: 200+a(3),300+b(3);200+a(3),280+b(3);198+a(3),282+b(3);198+a(3),298+b(3)
PLOT AREA: 220+a(3),300+b(3);220+a(3),280+b(3);218+a(3),282+b(3);218+a(3),298+b(3)
PLOT AREA: 240+a(3),300+b(3);240+a(3),280+b(3);238+a(3),282+b(3);238+a(3),298+b(3)
PLOT AREA: 260+a(3),300+b(3);260+a(3),280+b(3);258+a(3),282+b(3);258+a(3),298+b(3)
PLOT AREA: 220+a(3),280+b(3);220+a(3),260+b(3);218+a(3),262+b(3);218+a(3),278+b(3)
SET AREA COLOR 163
PLOT AREA: 180+a(3),300+b(3);200+a(3),300+b(3);198+a(3),298+b(3);182+a(3),298+b(3)
PLOT AREA: 200+a(3),300+b(3);220+a(3),300+b(3);218+a(3),298+b(3);202+a(3),298+b(3)
PLOT AREA: 220+a(3),300+b(3);240+a(3),300+b(3);238+a(3),298+b(3);222+a(3),298+b(3)
PLOT AREA: 240+a(3),300+b(3);260+a(3),300+b(3);258+a(3),298+b(3);242+a(3),298+b(3)
PLOT AREA: 200+a(3),280+b(3);220+a(3),280+b(3);218+a(3),278+b(3);202+a(3),278+b(3)
SET AREA COLOR 45
PLOT AREA: 180+a(3),280+b(3);182+a(3),282+b(3);198+a(3),282+b(3);200+a(3),280+b(3)
PLOT AREA: 200+a(3),280+b(3);202+a(3),282+b(3);218+a(3),282+b(3);220+a(3),280+b(3)
PLOT AREA: 220+a(3),280+b(3);222+a(3),282+b(3);238+a(3),282+b(3);240+a(3),280+b(3)
PLOT AREA: 200+a(3),260+b(3);202+a(3),262+b(3);218+a(3),262+b(3);220+a(3),260+b(3)
PLOT AREA: 240+a(3),280+b(3);242+a(3),282+b(3);258+a(3),282+b(3);260+a(3),280+b(3)
SET AREA COLOR 52
PLOT AREA: 260+a(4),280+b(4);262+a(4),282+b(4);278+a(4),282+b(4);280+a(4),280+b(4)
PLOT AREA: 280+a(4),280+b(4);282+a(4),282+b(4);298+a(4),282+b(4);300+a(4),280+b(4)
PLOT AREA: 260+a(4),260+b(4);262+a(4),262+b(4);278+a(4),262+b(4);280+a(4),260+b(4)
PLOT AREA: 280+a(4),260+b(4);282+a(4),262+b(4);298+a(4),262+b(4);300+a(4),260+b(4)
PLOT AREA: 280+a(4),240+b(4);282+a(4),242+b(4);298+a(4),242+b(4);300+a(4),240+b(4)
SET AREA COLOR 121
PLOT AREA: 260+a(4),300+b(4);260+a(4),280+b(4);262+a(4),282+b(4);262+a(4),298+b(4)
PLOT AREA: 280+a(4),300+b(4);280+a(4),280+b(4);282+a(4),282+b(4);282+a(4),298+b(4)
PLOT AREA: 260+a(4),280+b(4);260+a(4),260+b(4);262+a(4),262+b(4);262+a(4),278+b(4)
PLOT AREA: 280+a(4),280+b(4);280+a(4),260+b(4);282+a(4),262+b(4);282+a(4),278+b(4)
PLOT AREA: 280+a(4),260+b(4);280+a(4),240+b(4);282+a(4),242+b(4);282+a(4),258+b(4)
SET AREA COLOR 186
PLOT AREA: 280+a(4),300+b(4);280+a(4),280+b(4);278+a(4),282+b(4);278+a(4),298+b(4)
PLOT AREA: 300+a(4),300+b(4);300+a(4),280+b(4);298+a(4),282+b(4);298+a(4),298+b(4)
PLOT AREA: 280+a(4),280+b(4);280+a(4),260+b(4);278+a(4),262+b(4);278+a(4),278+b(4)
PLOT AREA: 300+a(4),280+b(4);300+a(4),260+b(4);298+a(4),262+b(4);298+a(4),278+b(4)
PLOT AREA: 300+a(4),260+b(4);300+a(4),240+b(4);298+a(4),242+b(4);298+a(4),258+b(4)
SET AREA COLOR 138
PLOT AREA: 260+a(4),300+b(4);280+a(4),300+b(4);278+a(4),298+b(4);262+a(4),298+b(4)
PLOT AREA: 280+a(4),300+b(4);300+a(4),300+b(4);298+a(4),298+b(4);282+a(4),298+b(4)
PLOT AREA: 260+a(4),280+b(4);280+a(4),280+b(4);278+a(4),278+b(4);262+a(4),278+b(4)
PLOT AREA: 280+a(4),280+b(4);300+a(4),280+b(4);298+a(4),278+b(4);282+a(4),278+b(4)
PLOT AREA: 280+a(4),260+b(4);300+a(4),260+b(4);298+a(4),258+b(4);282+a(4),258+b(4)
SET AREA COLOR 191
PLOT AREA: 140+a(5),300+b(5);140+a(5),280+b(5);142+a(5),282+b(5);142+a(5),298+b(5)
PLOT AREA: 160+a(5),300+b(5);160+a(5),280+b(5);162+a(5),282+b(5);162+a(5),298+b(5)
PLOT AREA: 140+a(5),280+b(5);140+a(5),260+b(5);142+a(5),262+b(5);142+a(5),278+b(5)
SET AREA COLOR 17
PLOT AREA: 160+a(5),280+b(5);162+a(5),282+b(5);178+a(5),282+b(5);180+a(5),280+b(5)
PLOT AREA: 140+a(5),280+b(5);142+a(5),282+b(5);158+a(5),282+b(5);160+a(5),280+b(5)
PLOT AREA: 140+a(5),260+b(5);142+a(5),262+b(5);158+a(5),262+b(5);160+a(5),260+b(5)
SET AREA COLOR 183
PLOT AREA: 180+a(5),300+b(5);180+a(5),280+b(5);178+a(5),282+b(5);178+a(5),298+b(5)
PLOT AREA: 160+a(5),300+b(5);160+a(5),280+b(5);158+a(5),282+b(5);158+a(5),298+b(5)
PLOT AREA: 160+a(5),280+b(5);160+a(5),260+b(5);158+a(5),262+b(5);158+a(5),278+b(5)
SET AREA COLOR 167
PLOT AREA: 160+a(5),300+b(5);180+a(5),300+b(5);178+a(5),298+b(5);162+a(5),298+b(5)
PLOT AREA: 140+a(5),300+b(5);160+a(5),300+b(5);158+a(5),298+b(5);142+a(5),298+b(5)
PLOT AREA: 140+a(5),280+b(5);160+a(5),280+b(5);158+a(5),278+b(5);142+a(5),278+b(5)
85 SET AREA COLOR 1
PLOT AREA: 140+a(6),280+b(6);140+a(6),300+b(6);160+a(6),300+b(6);160+a(6),280+b(6)
86 FOR k=1 TO 150000
87 NEXT k
140 IF b(m)>h-300 THEN GOTO 330
270 GOTO 60
330 LET b(m)=h-300
IF 140+a(6)=<5 and 140+a(6)>=-5 THEN GOTO 1610
IF 140+a(6)=<45 and 140+a(6)>=35 THEN GOTO 1610
IF 140+a(6)=<85 and 140+a(6)>=75 THEN GOTO 1610
IF 140+a(6)=<125 and 140+a(6)>=115 THEN GOTO 1610
IF 140+a(6)=<165 and 140+a(6)>=155 THEN GOTO 1610
IF 140+a(6)=<205 and 140+a(6)>=195 THEN GOTO 1610
IF 140+a(6)=<245 and 140+a(6)>=235 THEN GOTO 1610
IF 140+a(6)=<285 and 140+a(6)>=275 THEN GOTO 1610
1450 RANDOMIZE
LET j=INT(3*RND)+1
1500 NEXT m
1550 GOTO 20
1610 clear
rem SET AREA COLOR 0
rem PLOT AREA: 0,300;300,300;300,280;0,280
2000 END
ポチの散歩
5 SET WINDOW 0,300,300,0
50 LET a=-263
LET b=2
LET i=1
LET j=1
60 CLEAR
70 LET a=a+i
LET b=b+0
85 SET AREA COLOR 8
87 PLOT AREA: 100,50; 30,70; 5,110; 100,160; 210,110; 180,70; 160,65; 160,35; 150,30; 140,35; 140,60
PLOT AREA: 30,130; 100,165; 180,130; 175,210; 100,240; 35,210
SET LINE WIDTH 5
PLOT LINES : a+205,b+200; a+250,b+200; a+250,b+240; a+205,b+240; a+205,b+200
PLOT LINES : a+210,230; a+210,260; a+150,260; a+150,230; a+210,230
PLOT LINES : a+160,250; a+160,280; a+150,280; a+150,250; a+160,250
PLOT LINES : a+175,250; a+175,280; a+165,280; a+165,250; a+175,250
PLOT LINES : a+185,250; a+185,280; a+175,280; a+175,250; a+185,250
PLOT LINES : a+200,250; a+200,280; a+190,280; a+190,250; a+200,250
PLOT LINES : a+243,190; a+260,190; a+260,210; a+243,210; a+243,190
SET LINE WIDTH 6
PLOT LINES : a+222,220; a+223,220
PLOT LINES : a+240,220; a+241,220
SET LINE WIDTH 5
PLOT LINES : a+230,225; a+260,225; a+260,242; a+230,242; a+230,225
SET LINE WIDTH 5
PLOT LINES : a+160,225; a+160,240; a+130,240; a+130,225; a+160,225
SET AREA COLOR 1
PLOT AREA : a+193,190; a+220,190; a+220,210; a+193,210; a+193,190
90 FOR ti=1 TO 420000
95 NEXT ti
100 IF a>170 THEN GOTO 50
150 GOTO 60
END
迷路脱出
SET WINDOW 0,500,500,0
20 CLEAR
!meiro
SET LINE WIDTH 8
SET LINE COLOR 73
PLOT LINES:455,70;455,500 !migi1tate
PLOT LINES:410,30;410,390 !migi2tate
PLOT LINES:350,70;350,500 !migi3tate
PLOT LINES:300,30;300,390 !migi4tate
PLOT LINES:250,70;250,500 !migi5tate
PLOT LINES:100,20000;30,30 !hidari1tate
PLOT LINES:90,350;90,450 !hidari2tate(sita)
PLOT LINES:120,30;120,70 !hidari3tate
PLOT LINES:150,400;150,500 !hidari4tate(sita)
PLOT LINES:30,30;460,30 !ue1yoko
PLOT LINES:31,100;200,100 !ue2yoko
PLOT LINES:31,150;50,150 !ue3yoko(hidari)
PLOT LINES:90,150;250,150 !ue3yoko(migi)
PLOT LINES:31,200;200,200 !ue4yoko
PLOT LINES:90,250;250,250 !ue5yoko
PLOT LINES:31,300;200,300 !ue6yoko
PLOT LINES:90,350;250,350 !ue7yoko
PLOT LINES:200,450;250,450 !sita1yoko
PLOT LINES:150,400;200,400 !sita2yoko
!keyboad control
125 CHARACTER INPUT NOWAIT: a$
130 IF a$ = "i" THEN LET y = y-13
140 IF a$ = "j" THEN LET x = x-13
150 IF a$ = "k" THEN LET x = x
IF a$ = "k" THEN LET y = y
160 IF a$ = "l" THEN LET x = x+13
170 IF a$ = "m" THEN LET y = y+13
!meiro sen
IF x<0 THEN LET x=0
IF x>460 THEN LET x=460
IF y<-455 THEN LET y=-455
IF y>20 THEN LET y=20
!goal
175 SET AREA STYLE "HATCH"
176 SET AREA STYLE INDEX 6
180 SET AREA COLOR 241
190 DRAW disk WITH SCALE(10)*SHIFT(230,480)
!circle
200 SET AREA STYLE "SOLID"
210 SET AREA COLOR 184
250 DRAW disk WITH SCALE(10)*SHIFT(15+x,470+y)
!goal moji
300 IF 200<x AND 230>x AND y< 20 AND y>-20 THEN
310 SET TEXT COLOR 247
SET TEXT FONT "MS 明朝", 60
PLOT TEXT , AT 210,250 : "GOAL"
320 END IF
1000 FOR TI=0 TO 1000000
NEXT TI
1100 GOTO 20
END
グラスに氷を入れるゲーム
OPTION BASE 1
SET WINDOW 0,300,300,0
10 LET y2=0
LET v=INT(300*RND)
20 CLEAR
25 CHARACTER INPUT NOWAIT: a$
40 IF a$ = "j" THEN LET x = x-10
50 IF a$ = "k" THEN LET x = x
60 IF a$ = "l" THEN LET x = x+10
IF x>88 THEN LET x=88
IF x<-108 THEN LET x=-108
LET y2=y2+20
SET AREA COLOR 38
SET TEXT COLOR 1
SET TEXT HEIGHT 20
PLOT TEXT ,AT 20,30: STR$(sum)
200 PLOT AREA: 108+x ,200+y ; 120+x ,300+y ; 200+x,300+y; 212+x,200+y
SET COLOR 207
205 DRAW disk WITH SCALE(20)*SHIFT(v+x2,0+y2)
SET AREA COLOR 207
207 PLOT LINES: 108+x , 200+y ; 120+x ,300+y ; 200+x,300+y; 212+x,200+y; 212+x,200+y;108+x , 200+y
SET AREA COLOR 199
210 PLOT AREA: 200+x ,160+y ; 190+x ,300+y ; 200+x,300+y; 210+x,158+y
SET AREA COLOR 56
220 PLOT AREA: 110+x ,220+y ; 120+x ,300+y ; 200+x,300+y; 210+x,220+y
SET AREA COLOR 0
230 PLOT AREA: 120+x ,260+y ; 130+x ,270+y ; 140+x,265+y;130+x,250+y
SET AREA COLOR 0
240 PLOT AREA: 142+x ,280+y ; 140+x ,290+y ; 150+x,285+y;150+x,280+y
SET AREA COLOR 207
245 PLOT LINES: 108+x , 200+y ; 120+x ,300+y ; 200+x,300+y; 212+x,200+y;
280 IF v+x2>=140+x AND v+x2=<180+x THEN GOTO 285 ELSE GOTO 290
285 IF 0+y2>=220 AND 0+y2=<230 THEN GOTO 288 ELSE GOTO 290
288 LET sum = sum+10
290 FOR ti=0 TO 1000000
NEXT ti
300 RANDOMIZE
LET x2=INT(5*RND)
IF y2>300 THEN GOTO 10
GOTO 20
END